<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="laborc" uri="/laborc-tags"%>
<table id="box_table">
	<tr>
		<s:if test='sign=="0"'>
			<th class="box_th_1">
				发件人
			</th>
		</s:if>
		<s:elseif test='sign=="1"'>
			<th class="box_th_1">
				收件人
			</th>
		</s:elseif>
		<th class="box_th_2">
			主题
		</th>
		<th class="box_th_3">
			日期
		</th>
		<th class="box_th_4">
			操作
		</th>
	</tr>
	<s:if test="listEmail!=null">
		<s:iterator value="listEmail" id="email" status="st">
			<tr>
				<s:if test='sign=="0"'>
					<td class="box_tr_1">
						${email.fromPeople.name }
					</td>
				</s:if>
				<s:elseif test='sign=="1"'>
					<td class="box_tr_1">
						${email.toPeople.name }
					</td>
				</s:elseif>
				<s:if test="%{#email.emailTheme.length()>20}">
					<td>
						<s:property value="%{#email.emailTheme.substring(0,20)}" />
						…
					</td>
				</s:if>
				<s:else>
					<td>
						<s:property value="%{#email.emailTheme}" />
					</td>
				</s:else>
				<td class="box_tr_1">
					${email.email_Time }
				</td>
				<td class="box_tr_1">
					<s:a href="email/showEmail.action?num=%{#email.emailNum}" targets="showEmail_content" theme="ajax" onclick="openShowEmail()">查看</s:a>
				</td>
			</tr>
		</s:iterator>
		<tr>
			<td colspan="4" style="text-align: right;">
				<laborc:page cpage="%{cpage}" total="%{total}" url="%{url}" dojoType="struts:BindAnchor" targets="email_content"/>
			</td>
		</tr>
	</s:if>
	<s:else>
		<tr>
			<td colspan="4" style="text-align: center;">
				没有相关信件
			</td>
		</tr>
	</s:else>
</table>

